{"ast":null,"code":"import * as React from 'react';\nimport TableContext from \"../context/TableContext\";\nimport { useContextSelector } from \"../ContextSelector\";\nimport Summary from \"./Summary\";\nimport SummaryContext from \"./SummaryContext\";\nfunction Footer(_ref) {\n  var children = _ref.children,\n    stickyOffsets = _ref.stickyOffsets,\n    flattenColumns = _ref.flattenColumns;\n  var prefixCls = useContextSelector(TableContext, 'prefixCls');\n  var lastColumnIndex = flattenColumns.length - 1;\n  var scrollColumn = flattenColumns[lastColumnIndex];\n  var summaryContext = React.useMemo(function () {\n    return {\n      stickyOffsets: stickyOffsets,\n      flattenColumns: flattenColumns,\n      scrollColumnIndex: scrollColumn !== null && scrollColumn !== void 0 && scrollColumn.scrollbar ? lastColumnIndex : null\n    };\n  }, [scrollColumn, flattenColumns, lastColumnIndex, stickyOffsets]);\n  return /*#__PURE__*/React.createElement(SummaryContext.Provider, {\n    value: summaryContext\n  }, /*#__PURE__*/React.createElement(\"tfoot\", {\n    className: \"\".concat(prefixCls, \"-summary\")\n  }, children));\n}\nexport default Footer;\nexport var FooterComponents = Summary;","map":{"version":3,"names":["React","TableContext","useContextSelector","Summary","SummaryContext","Footer","_ref","children","stickyOffsets","flattenColumns","prefixCls","lastColumnIndex","length","scrollColumn","summaryContext","useMemo","scrollColumnIndex","scrollbar","createElement","Provider","value","className","concat","FooterComponents"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/rc-table/es/Footer/index.js"],"sourcesContent":["import * as React from 'react';\nimport TableContext from \"../context/TableContext\";\nimport { useContextSelector } from \"../ContextSelector\";\nimport Summary from \"./Summary\";\nimport SummaryContext from \"./SummaryContext\";\n\nfunction Footer(_ref) {\n  var children = _ref.children,\n      stickyOffsets = _ref.stickyOffsets,\n      flattenColumns = _ref.flattenColumns;\n  var prefixCls = useContextSelector(TableContext, 'prefixCls');\n  var lastColumnIndex = flattenColumns.length - 1;\n  var scrollColumn = flattenColumns[lastColumnIndex];\n  var summaryContext = React.useMemo(function () {\n    return {\n      stickyOffsets: stickyOffsets,\n      flattenColumns: flattenColumns,\n      scrollColumnIndex: scrollColumn !== null && scrollColumn !== void 0 && scrollColumn.scrollbar ? lastColumnIndex : null\n    };\n  }, [scrollColumn, flattenColumns, lastColumnIndex, stickyOffsets]);\n  return /*#__PURE__*/React.createElement(SummaryContext.Provider, {\n    value: summaryContext\n  }, /*#__PURE__*/React.createElement(\"tfoot\", {\n    className: \"\".concat(prefixCls, \"-summary\")\n  }, children));\n}\n\nexport default Footer;\nexport var FooterComponents = Summary;"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,YAAY,MAAM,yBAAyB;AAClD,SAASC,kBAAkB,QAAQ,oBAAoB;AACvD,OAAOC,OAAO,MAAM,WAAW;AAC/B,OAAOC,cAAc,MAAM,kBAAkB;AAE7C,SAASC,MAAM,CAACC,IAAI,EAAE;EACpB,IAAIC,QAAQ,GAAGD,IAAI,CAACC,QAAQ;IACxBC,aAAa,GAAGF,IAAI,CAACE,aAAa;IAClCC,cAAc,GAAGH,IAAI,CAACG,cAAc;EACxC,IAAIC,SAAS,GAAGR,kBAAkB,CAACD,YAAY,EAAE,WAAW,CAAC;EAC7D,IAAIU,eAAe,GAAGF,cAAc,CAACG,MAAM,GAAG,CAAC;EAC/C,IAAIC,YAAY,GAAGJ,cAAc,CAACE,eAAe,CAAC;EAClD,IAAIG,cAAc,GAAGd,KAAK,CAACe,OAAO,CAAC,YAAY;IAC7C,OAAO;MACLP,aAAa,EAAEA,aAAa;MAC5BC,cAAc,EAAEA,cAAc;MAC9BO,iBAAiB,EAAEH,YAAY,KAAK,IAAI,IAAIA,YAAY,KAAK,KAAK,CAAC,IAAIA,YAAY,CAACI,SAAS,GAAGN,eAAe,GAAG;IACpH,CAAC;EACH,CAAC,EAAE,CAACE,YAAY,EAAEJ,cAAc,EAAEE,eAAe,EAAEH,aAAa,CAAC,CAAC;EAClE,OAAO,aAAaR,KAAK,CAACkB,aAAa,CAACd,cAAc,CAACe,QA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